"""

author:Jin


"""

lis = [1,31,5,1,1,1,1,1,5,1,1]
#求出数组n/2数值
m = len(lis)//2
# result = {}
# for i in lis:
#     if result.get(i)==None:
#         result[i]=1
#     else:
#         result[i]+=1
# lis2 = []
# for k,v in result.items():
#     if v>m:
#         lis2.append(k)
# if lis2==None:
#     print("没有出现次数大于n/2的元素")
# else:
#     print(f"出现次数大于n/2的元素为{lis2}")

from collections import Counter
num = Counter(lis)
lis2 = []
for k,v in num.items():
    if v>m:
        lis2.append(k)
if lis2==None:
    print("没有出现次数大于n/2的元素")
else:
    print(f"出现次数大于n/2的元素为{lis2}")